package org.iwidget.desktop.core.bsf;
import org.iwidget.desktop.core.Iwidget;
import org.iwidget.desktop.model.WidgetElement;
/**
 *
 * @author Muhammad Hakim A
 */


public class IwidgetMouseBSF
{

    public IwidgetMouseBSF(WidgetElement widget)
    {
        this.widget = widget;
    }

    public int getScreenX()
    {
        return Iwidget.iwidgetMouse.mouseX;
    }

    public synchronized int getScreenY()
    {
        return Iwidget.iwidgetMouse.mouseY;
    }

    public int getX()
    {
        return Iwidget.iwidgetMouse.mouseX - widget.getUIComponent().getX();
    }

    public int getY()
    {
        return Iwidget.iwidgetMouse.mouseY - widget.getUIComponent().getY();
    }

    WidgetElement widget;
}